﻿using System;
using System.Collections.Generic;
using System.Data.Objects;
using System.Linq;
using System.Text;
using CoffeeTeaTrading.Repository.Context;
using CoffeeTeaTrading.Repository.Interfaces;

namespace CoffeeTeaTrading.Repository.Repositories
{
    public class OrderRepository : BaseRepository<Order>, IOrderRepository
    {
        public OrderRepository()
            : base(new CTTradeDataEntities())
        {
        }

        protected override void UpdateItem(Order oldItem, Order item)
        {
            item.Name = oldItem.Name;
            item.Type = oldItem.Type;
            item.TotalAmount = oldItem.TotalAmount;
            item.OrderDate = oldItem.OrderDate;
            item.Status = oldItem.Status;
            item.CTCustomerID = oldItem.CTCustomerID;
        }
    }
}
